package sysu.el.graph.tree;

import sysu.el.array.ints.ArrInt;
import sysu.el.graph.GraphConstants;

/**
 * The design is raw, but it is good for the tree manipulation
 * @author Edwin
 *
 */

public class FastChildrenTreeTopo {
	public int root;
	public ArrInt children[];
	public int getNodeNum(){
		return children.length;
	}
	
	public int getDegree(int i){
		return children[i].counter;
	}
	
	public FastChildrenTreeTopo(int n){
		children = new ArrInt[n];
	}
	
	protected FastChildrenTreeTopo(){
		
	}
	
	protected void addEdge(int fa, int child){
//		if (children[fa].list[child] == GraphConstants.NULL_NODE){
//			children[fa] = child;
//		}else{
//			int sibling = children[fa];
//			while (siblings[sibling] != GraphConstants.NULL_NODE){
//				sibling = siblings[sibling];
//			}
//			siblings[sibling] = child;
//		}
	}
}
